package com.region.http.client.request;

import com.region.http.client.config.RequestAnnotationConfig;
import com.region.http.client.model.RequestParameter;
import com.region.http.client.model.ResponseData;
import com.region.http.client.request.simple.SimpleHttpExecutor;

/**
 * The executor of http remote function
 *
 * @author liujieyu
 * @date 2023/6/4 22:17
 * @desciption
 */
public interface HttpExecutor {

    Class<? extends HttpExecutor> DEFAULT_HTTP_EXECUTOR_CLASS = SimpleHttpExecutor.class;
    /**
     * specific http request
     *
     * @param url
     * @param requestAnnotationConfig
     * @param parameters
     * @return
     */
    ResponseData execute(String url, RequestAnnotationConfig requestAnnotationConfig, RequestParameter parameters) throws Throwable;

}
